using System.Collections.Generic;
using CSI.Directory.Core.Model;

namespace CSI.Directory.Core.Repositories
{
    public interface IRepositoryBase
    {
        T GetById<T>(int id) where T : Root, new();
        T GetByName<T>(string name) where T : Base, new();
        IList<T> GetAll<T>() where T : class, new();
        void Add<T>(T item) where T : class, new();
        int Delete<T>(int key) where T : class, new();
        void Delete<T>(IList<T> items) where T : class, new();
        int Update<T>(T item) where T : class, new();
        void AddMany<T>(IList<T> items) where T : class, new();
    }
}